package com.minimalist.basic.config.rocketmq.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author 11987
 */
@Slf4j
@Service
@RocketMQMessageListener(consumerGroup = "string_consumer", topic = "TestTopic")
public class RocketMqConsumer implements RocketMQListener<MessageExt> {

    @Override
    public void onMessage(MessageExt messageExt) {
        log.info("收到消息: {}", messageExt);
    }
}
